﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="WorkTimeOvertimeList.aspx.cs" Inherits="WorkTime_WorkTimeOvertimeList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Titile" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" Runat="Server">
 <InfoLight:WebDataSource ID="Master" runat="server" AutoApply="True" WebDataSetID="WMaster" DataMember="View_WorkTime_Overtime" SelectAlias="" SelectCommand="" CacheDataSet="True">
        </InfoLight:WebDataSource>
        <InfoLight:WebClientQuery ID="WebClientQuery1" runat="server" 
        DataSourceID="Master" Font-Names="Simsun" Font-Size="Small" GapHorizontal="20" 
        KeepCondition="False">
            <Columns>
                <InfoLight:WebQueryColumns Caption="员工" Column="EmployeeId" ColumnType="ClientQueryRefValColumn"
                    DefaultValue="" NewLine="False" NotNull="False" NotNullBackColor="White" Text=""
                    Width="120" WebRefVal="QueryEmp" />
                <InfoLight:WebQueryColumns Caption="加班时数(&gt;=)" Column="OvHours" DefaultValue=""
                    NewLine="False" NotNull="False" NotNullBackColor="White" Operator="&gt;=" Text=""
                    Width="120" />
                <InfoLight:WebQueryColumns Caption="工作流标志" Column="FlowFlag" DefaultValue=""
                    NewLine="False" NotNull="False" NotNullBackColor="White" Text="" Width="120" ColumnType="ClientQueryComboBoxColumn" WebRefVal="QueryFlowFlag" />
                <InfoLight:WebQueryColumns Caption="起始日期" Column="OvertimeDate" ColumnType="ClientQueryCalendarColumn"
                    DefaultValue="" NewLine="True" NotNull="False" NotNullBackColor="White" Operator="&gt;="
                    Text="" Width="120" />
                <InfoLight:WebQueryColumns Caption="终止日期" Column="OvertimeDate" ColumnType="ClientQueryCalendarColumn"
                    DefaultValue="" NewLine="False" NotNull="False" NotNullBackColor="White" Operator="&lt;="
                    Text="" Width="120" />
            </Columns>
        </InfoLight:WebClientQuery>
        <InfoLight:WebDataSource ID="wdsWorkTime_YearHolidayEmployeeId" runat="server" SelectAlias="Usasdb"
            SelectCommand="select &#13;&#10;Employees.EmployeeID,&#13;&#10;Employees.EmpName,&#13;&#10;Department.DepartmentName &#13;&#10;FROM Employees&#13;&#10; left join Department on Employees.DepartmentId=Department.DepartmentId" CacheDataSet="True">
        </InfoLight:WebDataSource>
        <InfoLight:WebDataSource ID="wsFlowFlag" runat="server" SelectAlias="Usasdb" SelectCommand="select Sys_FlowFlag.FlowFlag,Sys_FlowFlag.FlowFlagName from Sys_FlowFlag">
        </InfoLight:WebDataSource>
        <InfoLight:WebRefVal ID="QueryFlowFlag" runat="server" DataSourceID="wsFlowFlag"
            DataTextField="FlowFlagName" DataValueField="FlowFlag" Visible="False" Width="136px">
            <Columns>
                <InfoLight:WebRefColumn ColumnName="FlowFlag" HeadText="FlowFlag" Width="100" />
                <InfoLight:WebRefColumn ColumnName="FlowFlagName" HeadText="FlowFlagName" Width="100" />
            </Columns>
        </InfoLight:WebRefVal>
        <InfoLight:WebRefVal ID="QueryEmp" runat="server" AllowAddData="False" BindingText=""
            BindingValue='<%# Bind("EmployeeId") %>' ButtonImageUrl="../Image/refval/RefVal.gif"
            DataBindingField="" DataSourceID="wdsWorkTime_YearHolidayEmployeeId" DataTextField="EmpName"
            DataValueField="EmployeeID" MultiLanguage="False" PostBackButonClick="False"
            ReadOnly="False" ResxDataSet="" ResxFilePath="" UpdatePanelID="" UseButtonImage="True"
            Visible="False" Width="130px">
            <Columns>
                <InfoLight:WebRefColumn ColumnName="EmployeeID" HeadText="员工编号" Width="100" />
                <InfoLight:WebRefColumn ColumnName="EmpName" HeadText="员工姓名" Width="100" />
                <InfoLight:WebRefColumn ColumnName="DepartmentName" HeadText="所在部门" Width="100" />
            </Columns>
        </InfoLight:WebRefVal>
         <InfoLight:WebNavigator ID="WebNavigator1" runat="server" BackColor="PowderBlue"
            BindingObject="wgvMaster" BorderColor="Silver" BorderStyle="Groove" BorderWidth="2px"
            Height="22px" OnCommand="WebNavigator1_Command" ShowDataStyle="GridStyle" StatusStrip="WebStatusStrip1"
            Visible="False" Width="100%">
            <NavControls>
                <InfoLight:ControlItem ControlName="Query" ControlText="琩高" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/query.gif" MouseOverImageUrl="../image/uipics/query2.gif"
                    Size="25" />
                <InfoLight:ControlItem ControlName="Print" ControlText="ゴ" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/print.gif" MouseOverImageUrl="../image/uipics/print2.gif"
                    Size="25" />
                <InfoLight:ControlItem ControlName="ClientQuery" ControlText="查询2" ControlType="Image"
                    ControlVisible="True" ImageUrl="../image/uipics/query.gif" MouseOverImageUrl="../image/uipics/query2.gif"
                    Size="25" />
            </NavControls>
            <NavStates>
                <InfoLight:WebNavigatorStateItem StateText="Initial" />
                <InfoLight:WebNavigatorStateItem StateText="Browsed" />
                <InfoLight:WebNavigatorStateItem StateText="Inserting" />
                <InfoLight:WebNavigatorStateItem StateText="Editing" />
                <InfoLight:WebNavigatorStateItem StateText="Applying" />
                <InfoLight:WebNavigatorStateItem StateText="Changing" />
                <InfoLight:WebNavigatorStateItem StateText="Querying" />
                <InfoLight:WebNavigatorStateItem StateText="Printing" />
            </NavStates>
            <QueryFields>
                <InfoLight:WebQueryField Caption="员工编号" Condition="=" DefaultValue="" FieldName="EmployeeId"
                    Mode="RefVal" RefVal="QueryEmp" />
                <InfoLight:WebQueryField Caption="请假类型编号" Condition="=" DefaultValue="" FieldName="LeaveTypeId"
                    Mode="ComboBox" RefVal="QueryLeaveType" />
                <InfoLight:WebQueryField Caption="工作流标志" Condition="=" DefaultValue="" FieldName="FlowFlag"
                    Mode="RefVal" RefVal="QueryFlowFlag" />
            </QueryFields>
        </InfoLight:WebNavigator>
        <table cellpadding="0" cellspacing="5" class="TbSearch">
            <tr>
                <td colspan="2" rowspan="5">
                    <asp:Panel ID="Panel1" runat="server" Height="100%" Width="100%">
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td style="width: 30%; height: 26px; text-align:right;">
                <span class="roundbtn">
                    <asp:LinkButton ID="btnSearch" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;查 询&nbsp;&nbsp;&nbsp;&nbsp;" OnClick="btnSearch_Click"
                        ></asp:LinkButton>
                </span>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   </td>
            </tr>
            <tr>
                <td style="width: 30%; height: 10px; ;">
                </td>
            </tr>
            <tr>
                <td style="width: 30%;text-align:right">
                   <span class="roundbtn">
                    <asp:LinkButton ID="btnClear" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;清 除&nbsp;&nbsp;&nbsp;&nbsp;" OnClick="btnClear_Click"
                        ></asp:LinkButton>
                </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
            </tr>
        </table>
         <InfoLight:webgridview id="wgvMaster" runat="server"
            cellpadding="5" datasourceid="Master" forecolor="#333333" width="100%" 
        AbortIconUrl="../Image/UIPics/Abort.gif" AddIconUrl="../Image/UIPics/Add.gif" 
        ApplyIconUrl="../Image/UIPics/Apply.gif" 
        CancelIconUrl="../Image/UIPics/Cancel.gif" 
        MouseOverAbortIconUrl="../Image/UIPics/Abort2.gif" 
        MouseOverAddIconUrl="../Image/UIPics/Add2.gif" 
        MouseOverApplyIconUrl="../Image/UIPics/Apply2.gif" 
        MouseOverCancelIconUrl="../Image/UIPics/Cancel2.gif" 
        MouseOverOKIconUrl="../Image/UIPics/OK2.gif" 
        MouseOverQueryIconUrl="../Image/UIPics/Query2.gif" 
        OKIconUrl="../Image/UIPics/OK.gif" QueryIconUrl="../Image/UIPics/Query.gif" 
        HeaderStyleWrap="False" BackColor="White" BorderColor="White" 
        BorderStyle="Groove" BorderWidth="2px" CreateInnerNavigator="False" 
        PageSize="15">
            <PagerSettings Mode="NumericFirstLast" />
<FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True"></FooterStyle>
            <navcontrols>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/add2.gif" ControlText="add" ControlName="Add" ControlType="Image" ImageUrl="../image/uipics/add.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/ok2.gif" ControlText="Insert" ControlName="OK" ControlType="Image" ImageUrl="../image/uipics/ok.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/cancel2.gif" ControlText="cancel" ControlName="Cancel" ControlType="Image" ImageUrl="../image/uipics/cancel.gif"></InfoLight:ControlItem>
</navcontrols>
            <Columns>
                <asp:BoundField DataField="OvertimeId" HeaderText="加班单编号" SortExpression="OvertimeId" />
                <asp:BoundField DataField="EmployeeId" HeaderText="员工编号" SortExpression="EmployeeId" />
                <asp:BoundField DataField="EmpName" HeaderText="员工姓名" SortExpression="EmpName" />
                <asp:BoundField DataField="DepartmentName" HeaderText="部门名称" SortExpression="DepartmentName" />
                <asp:BoundField DataField="OvertimeDate" HeaderText="加班日期" SortExpression="OvertimeDate" htmlEncode= "False" DataFormatString="{0:d}"  />
                <asp:TemplateField HeaderText="加班时间" SortExpression="OvHours">
                 <itemtemplate>
                   <asp:Label runat="server" Text='<%# GetOverTimeRange(Eval("StartHour"), Eval("StartMinute"), Eval("EndHour"), Eval("EndMinute")) %>' id="Label1"></asp:Label>
               </itemtemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="OvHours" HeaderText="加班时数" SortExpression="OvHours" />
                <asp:BoundField DataField="PlanWork" HeaderText="计划完成的工作" SortExpression="PlanWork" />
                <asp:BoundField DataField="FactResult" HeaderText="实际完成的工作" SortExpression="FactResult" />
                <asp:BoundField DataField="FlowFlagName" HeaderText="流程标志" SortExpression="FlowFlagName" />
</Columns>

<RowStyle BackColor="#EFF3FB"></RowStyle>

<EditRowStyle BackColor="#2461BF"></EditRowStyle>

<SelectedRowStyle BackColor="#D1DDF1" ForeColor="#333333" Font-Bold="True"></SelectedRowStyle>

<PagerStyle BackColor="LightBlue" ForeColor="White" HorizontalAlign="Center"></PagerStyle>

<HeaderStyle BackColor="DeepSkyBlue" ForeColor="White" Font-Bold="True"></HeaderStyle>

<AlternatingRowStyle BackColor="White" BorderColor="White"></AlternatingRowStyle>
</InfoLight:webgridview>
</asp:Content>

